import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
import { CommonEntity } from '@entity/common.entity';

// 区域表-实体类
@Entity('sys_region', { comment: '区域信息表' })
export class RegionEntity extends CommonEntity {
  @PrimaryGeneratedColumn({ type: 'int', name: 'region_id', comment: '区域ID' })
  regionId: number;

  @Column({ type: 'varchar', name: 'region_name', length: 100, comment: '区域名称' })
  regionName: string;

  @Column({ type: 'varchar', name: 'region_code', length: 50, comment: '区域编码' })
  regionCode: string;

  @Column({ type: 'int', name: 'parent_id', default: 0, comment: '父级ID' })
  parentId: number;

  @Column({ type: 'int', name: 'order_num', default: 0, comment: '显示顺序' })
  orderNum: number;

  @Column({ type: 'char', length: 1, default: '0', comment: '状态（0正常 1停用）' })
  status: string;

  @Column({ type: 'varchar', name: 'remark', length: 500, default: '', comment: '备注' })
  remark: string;
}









